Page({
  data:{
    //设备参数
    deviceModle:{},
        kgOn: true  //开关

  },
  onLoad:function(options){

   var jsonData = JSON.parse(options["deviceModle"])
    
    var isOnline = false

    if (jsonData["onlineMode"] == 1) {
             isOnline = true
    }else{
             isOnline = false
    }

    this.setData({
      deviceModle:jsonData,
      isOnline:isOnline
    })


  },
  onReady:function(){
    
  },
  onShow:function(){
       //设置导航栏标题
    wx.setNavigationBarTitle({
           title: this.data.deviceModle["deviceName"]
         })
  },

  onHide:function(){
    
  },
  onUnload:function(){
    
  },
  onPullDownRefresh:function(){
    
  },
  onReachBottom:function(){
    
  }
})    